class Animal{
    public void sing(){
        System.out.println("狗在叫");
    }
}
class Cat extends Animal{
    @java.lang.Override
    public void sing() {
        System.out.println("猫在叫");
    }
}

public class Override {
    public static void main(String[] args){
        Animal dog=new Animal();
        dog.sing();
        Cat rab = new Cat();
        rab.sing();
    }
}
